<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:a="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
                template="layout/template.xhtml">
                       
<ui:define name="body">
    
    <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>

    <h:form id="tipRocnosti" styleClass="edit">
    
        <rich:panel>
            <f:facet name="header">#{tipRocnostiHome.managed ? 'Edit' : 'Add'} TipRocnosti</f:facet>


            <s:decorate id="nazivDecoration" template="layout/edit.xhtml">
                <ui:define name="label">naziv</ui:define>
                <h:inputText id="naziv" 
                           size="30"
                      maxlength="30"
                          value="#{tipRocnostiHome.instance.naziv}"
                          required="true">
                    <a:support event="onblur" reRender="nazivDecoration" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>
        
            <div style="clear:both">
                <span class="required">*</span> 
                required fields
            </div>
            
        </rich:panel>
                
        <div class="actionButtons">

            <h:commandButton id="save" 
                          value="Save" 
                         action="#{tipRocnostiHome.persist}"
                       disabled="#{!tipRocnostiHome.wired}"
                       rendered="#{!tipRocnostiHome.managed}"/>  
                          			  
            <h:commandButton id="update" 
                          value="Save" 
                         action="#{tipRocnostiHome.update}"
                       rendered="#{tipRocnostiHome.managed}"/>
                        			  
            <h:commandButton id="delete" 
                          value="Delete" 
                         action="#{tipRocnostiHome.remove}"
                      immediate="true"
                       rendered="#{tipRocnostiHome.managed}"/>
                    
            <s:button id="done" 
                   value="Done"
             propagation="end"
                    view="/TipRocnosti.xhtml"
                rendered="#{tipRocnostiHome.managed}"/>
                
            <s:button id="cancel" 
                   value="Cancel"
             propagation="end"
                    view="/#{empty tipRocnostiFrom ? 'TipRocnostiList' : tipRocnostiFrom}.xhtml"
                rendered="#{!tipRocnostiHome.managed}"/>

        </div>
    </h:form>


</ui:define>

</ui:composition>
